package com.example.zhc36.fragment.apadter;

import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.example.zhc36.fragment.utils.app.BaseFragment;


public class Pageradapter1 extends FragmentPagerAdapter {
    private BaseFragment[] frags;
    private String[] texts;

    public Pageradapter1(FragmentManager fm, BaseFragment[] frags, String[] texts) {
        super(fm);
        this.frags = frags;
        this.texts = texts;
    }

    @Override
    public Fragment getItem(int i) {
        return frags[i];
    }

    @Override
    public int getCount() {
        return frags.length;
    }

    @Nullable
    @Override
    public CharSequence getPageTitle(int position) {
        return texts[position];
    }
}
